package leetcodecompetition.D341;

public class T6376 {
    public int[] rowAndMaximumOnes(int[][] mat) {

        int maxSum=0;
        int maxCol=0;

        for (int i = 0; i <mat.length ; i++) {
            int sum=0;
            for (int j = 0; j <mat[0].length ; j++) {
                if (mat[i][j]==1)sum++;
            }
            if (sum>maxSum){
                maxSum=sum;
                maxCol=i;
            }
        }
        return new int[]{maxCol,maxSum};

    }
}
